<!--
 * @Descripttion: 
 * @version: 1.0
 * @Author: wjh
 * @Date: 2024-02-19 14:13:48
 * @LastEditors: wjh
 * @LastEditTime: 2024-03-05 17:38:24
-->

<template>
    <div id="Submit" :class="{ smallFontSize: showEdition, mediumFontSize: !showEdition }">
        <div style="height: 75vh;text-align:center;padding-top: 20vh;overflow:auto;">
            <div style="margin-bottom: 10px;">
                <img src="./../../../static/imgs/ZLJ/success.png" />
            </div>
            <div style="font-size: 24px;font-weight: 600;">提交成功</div>
            <div style="padding: 66px;text-indent: 33.3px;">
                <p>您的建房申请信息已提交系统审核,如需查看进度可在我的待办中查看!</p>
                <p> <span style="color: red;">{{ count }}秒</span>后返回首页!</p>
            </div>

            <div style="width: 100vw; padding-bottom: 20px; display: flex; justify-content: center;z-index: 999999;">
                <el-button class="bottomBtn" @click="getReturn" v-preventReClick="7000">点击立即返回首页</el-button>
            </div>
        </div>
        <div class="footbar">
            <van-swipe class="my-swope" :autoplay="2000" indicator-color="red">
                <van-swipe-item :key="1">
                    <div style="border: 0px solid red;width: 100%;overflow-y: auto;" @click="RuralcreditSerVice()">
                        <img src="./../../../static/imgs/ZLJ/5.png" alt="" style="width: 100%;">
                    </div>

                </van-swipe-item>
                <van-swipe-item :key="2">
                    <div style="border: 0px solid red;width: 100%;overflow-y: auto;" @click="RuralcreditSerVice()">
                        <img src="./../../../static/imgs/ZLJ/5.png" alt="" style="width: 100%;">
                    </div>

                </van-swipe-item>
            </van-swipe>
        </div>
    </div>
</template>

<script>
import { Swipe, SwipeItem } from 'vant'
import { zhejiangVillageLoanInfolist } from '../../utils/api'
export default {
    name: "Submit",
    data() {

        return {
            count: '',//倒计时
            show: false,
            showEdition: false,
            value: '',
            bannerList: [],
            List: [
            ],
            ListData: [
                // {
                //     belongCountry: "定海区",
                //     belongTown: "昌国街道",
                //     secondBranch: "定海支行营业部",
                //     secondBranchAddress: "定海区解放西路38号",
                //     contactManagerName: "李晓英",
                //     contactManagerPhone: "13957222938",
                // },
            ]
        }
    },
    watch: {
        value() {

        }
    },
    created() {

    },
    mounted() {
        this.showEdition = this.$store.state.Edition
        this.getUserInfoList();
        this.changeStats();
        if (ZWJSBridge) {
            ZWJSBridge.setTitle({
                "title": "已提交"
            }).then(res => {
            }).catch(err => {
            })
        }
    },
    methods: {
        //获取联系人列表
        async getUserInfoList() {
            let param = {
                "cityCode": window.localStorage.getItem('citycodeChange') ? window.localStorage.getItem('citycodeChange') : window.localStorage.getItem("citycode"),
                // "secondBranch": "",
                // "secondBranchAddress": "",
                // "contactManagerName": "",
                "pageNo": 1,
                "pageSize": 10
            }
            let result = await zhejiangVillageLoanInfolist(param);
            debugger
            if (result.data.data && result.data.data.pageList.length > 0) {
                debugger
                this.ListData = result.data.data.pageList;
            }
        },
        phoneCall(data) {
            ZWJSBridge.onReady(() => {
                ZWJSBridge.phoneCall({
                    corpId: data
                })
                    .then((result) => { })
                    .catch((error) => { })
            })
        },

        getReturn() {
            this.$router.push({
                path: '/ZLJIndex'
            })
        },
        RuralcreditSerVice() {
            this.$router.push({
                path: '/Ruralcredit'
            })
        },
        changeStats() {
            const TIME_COUNT = 5;
            if (!this.timer) {
                this.count = TIME_COUNT;
                this.timer = setInterval(() => {
                    if (this.count > 0 && this.count <= TIME_COUNT) {
                        this.count--;
                    } else {
                        clearInterval(this.timer)
                        this.timer = null;
                        //返回首页
                        this.$router.push({
                            path: '/ZLJIndex'
                        })
                    }
                }, 1000);
            }

        },
    }
}
</script>

<style>
.my-swipe .van-swipe-item {
    color: #fff;
    font-size: 20px;
    line-height: 150px;
    text-align: center;
    background-color: #39a9ed;
}
</style>

<style lang="scss">
#Submit {
    background: #fff;
    font-size: 14px;
    height: 100vh;
    overflow-y: auto;

    .van-steps--vertical {
        padding: 18px 18px 18px 18px;
    }

    .divConent {
        border-radius: 10px;
        box-shadow: 1px 1px 4px 4px #e9e7e7;
        padding: 15px;
        margin-top: 10px;

        p {
            line-height: 24px;
        }

    }

    .footbar {
        height: calc(100vh - 77vh);
    }

    .bottomBtn {
        // height: 40px;
        width: 88.6%;
        background: #007aff;
        // line-height: 40px;
        text-align: center;
        color: #ffffff;
        font-weight: bold;
        margin: 0 10px;
        border-radius: 10px;
    }

    // .my-swipe {

    //     #divTree {

    //     }
    // }
}
</style>